<template>
  <el-table :data="list">
    <el-table-column label="日期" prop="create_time" />
    <el-table-column label="工单" prop="ext_id" />
    <el-table-column label="入库数量" prop="enter_number" />
    <el-table-column label="出库数量" prop="appear_number" />
    <el-table-column label="归还的数量" prop="handback_number" />
    <el-table-column label="系统数量" prop="number" />
  </el-table>
</template>

<script>
import API from '@/api/maintain/part'
export default {
  name: 'PartDeal',
  props: {
    value: {
      type: Number,
      default: 0
    }
  },
  data() {
    return {
      list: [
        {
          create_time: '2020-01-01',
          ext_id: 'ENTER1',
          enter_number: '10',
          appear_number: '',
          handback_number: '',
          number: '20'
        }, {
          create_time: '2020-02-01',
          ext_id: 'APPEAR2',
          enter_number: '',
          appear_number: '10',
          handback_number: '',
          number: '10'
        }, {
          create_time: '2020-02-01',
          ext_id: 'HANDBACK1',
          enter_number: '',
          appear_number: '',
          handback_number: '2',
          number: '12'
        }
      ]
    }
  },
  watch: {
    value() {
      this.index()
    }
  },
  created() {
    this.index()
  },
  methods: {
    index() {
      // API.wordorder({ part_id: this.value }).then(response => {
      //   console.log('TCL: index -> response', response)
      // })
    }
  }
}
</script>

<style>
</style>
